package algorithm.tree.theadedBinaryTree;

public class TreeNode {
    int no;
    String name;
    TreeNode left;
    TreeNode right;
    //用0表示指向左子树或者右子树
    //用1表示指向前驱后者后继节点
    int leftType;
    int rightType;

    public TreeNode(int no, String name) {
        this.no = no;
        this.name = name;
    }

    @Override
    public String toString() {
        return "TreeNode{" +
                "no=" + no +
                ", name='" + name + '\'' +
                ", leftType=" + leftType +
                ", rightType=" + rightType +
                '}';
    }
}
